/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jims.master.common.persistence.DataEntity;

/**
 * 药品调价记录表Entity
 * @author CTQ
 * @version 2017-07-08
 */
public class DrugPriceAdjustRecord extends DataEntity<DrugPriceAdjustRecord> {
	
	private static final long serialVersionUID = 1L;
	private String drugPriceId;		// 药品价格ID
	private Double quantity;		// 大包装库存量
	private String supplierId;		// 供应商
	private Date changeDate;		// 调价时间
	private Double tradeCurrentPrice;		// 当前批发价格
	private Double tradeUpperPrice;		// 上次批发价格
	private Double tradeDifferentPrice;		// 批发差价
	private Double retailCurrentPrice;		// 当前零售价格
	private Double retailUpperPrice;		// 上次零售价格
	private Double retailDifferentPrice;		// 零售差价

	private String drugName;
	private String drugSpec;
	private String firmName;
	
	public DrugPriceAdjustRecord() {
		super();
	}

	public DrugPriceAdjustRecord(String id){
		super(id);
	}

	@Length(min=1, max=64, message="药品价格ID长度必须介于 1 和 64 之间")
	public String getDrugPriceId() {
		return drugPriceId;
	}

	public void setDrugPriceId(String drugPriceId) {
		this.drugPriceId = drugPriceId;
	}
	
	public Double getQuantity() {
		return quantity;
	}

	public void setQuantity(Double quantity) {
		this.quantity = quantity;
	}
	
	@Length(min=0, max=64, message="供应商长度必须介于 0 和 64 之间")
	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="调价时间不能为空")
	public Date getChangeDate() {
		return changeDate;
	}

	public void setChangeDate(Date changeDate) {
		this.changeDate = changeDate;
	}
	
	@NotNull(message="当前批发价格不能为空")
	public Double getTradeCurrentPrice() {
		return tradeCurrentPrice;
	}

	public void setTradeCurrentPrice(Double tradeCurrentPrice) {
		this.tradeCurrentPrice = tradeCurrentPrice;
	}
	
	public Double getTradeUpperPrice() {
		return tradeUpperPrice;
	}

	public void setTradeUpperPrice(Double tradeUpperPrice) {
		this.tradeUpperPrice = tradeUpperPrice;
	}
	
	@NotNull(message="批发差价不能为空")
	public Double getTradeDifferentPrice() {
		return tradeDifferentPrice;
	}

	public void setTradeDifferentPrice(Double tradeDifferentPrice) {
		this.tradeDifferentPrice = tradeDifferentPrice;
	}
	
	@NotNull(message="当前零售价格不能为空")
	public Double getRetailCurrentPrice() {
		return retailCurrentPrice;
	}

	public void setRetailCurrentPrice(Double retailCurrentPrice) {
		this.retailCurrentPrice = retailCurrentPrice;
	}
	
	public Double getRetailUpperPrice() {
		return retailUpperPrice;
	}

	public void setRetailUpperPrice(Double retailUpperPrice) {
		this.retailUpperPrice = retailUpperPrice;
	}
	
	@NotNull(message="零售差价不能为空")
	public Double getRetailDifferentPrice() {
		return retailDifferentPrice;
	}

	public void setRetailDifferentPrice(Double retailDifferentPrice) {
		this.retailDifferentPrice = retailDifferentPrice;
	}

	public String getDrugName() {
		return drugName;
	}

	public void setDrugName(String drugName) {
		this.drugName = drugName;
	}

	public String getDrugSpec() {
		return drugSpec;
	}

	public void setDrugSpec(String drugSpec) {
		this.drugSpec = drugSpec;
	}

	public String getFirmName() {
		return firmName;
	}

	public void setFirmName(String firmName) {
		this.firmName = firmName;
	}
}